<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        var_dump($_POST);
        var_dump($_GET);
        $uname=$_POST["uname"];
        $password=$_POST["password"];
        $upwd=$_POST["upwd"];
        $uemail=$_POST["uemail"];
//        echo $uname.",".$password.",".$upwd.",".$uemail."<br>";
        
        
        $link=  mysqli_connect("localhost","root","");
        mysqli_select_db($link, "nhcar");
        mysqli_set_charset($link,"utf8");
        $sql="INSERT INTO users(uname,upwd,uemail)VALUES('$uname','$upwd','$uemail');";
        
        
        $result = mysqli_query($link, $sql);
        var_dump($result);
        if($result){
            header("Location:login.php");
        }else{
            header("Location:register.php");
}
?>
    </body>
</html>
